<template>
  <div>
    <div class="btn" @click="handleClick">{{btnText}}</div>
  </div>
</template>

<script>
export default {
  props: ["btnText"],
  methods: {
    handleClick() {
      // console.log("子组件被点击了");
      // 通知父子件
      this.$emit("handleClick");
    },
  },
};
</script>

<style lang="less" scoped>
.btn {
  width: 100%;
  line-height: 50/360 * 100vw;
  font-size: 18/360 * 100vw;
  border-radius: 24/360 * 100vw;
  margin-top: 40/360 * 100vw;
  text-align: center;
  color: #fff;
  background-color: #cc3300;
  background-image: repeating-linear-gradient(red, yellow);
}
</style>